pv-on-hvm: Correct the order of the argument of out*()
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 29 Jan 2010 07:10:28 +0000 (07:10 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 29 Jan 2010 07:10:28 +0000 (07:10 +0000)
The order of the argument of outl() is wrong.
The correct order is outl(value, port). This causes kernel panic.

And outw() is also similar.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c

index b2ea7b5bbe7367735821ace170b51990c0692021..dedb846e7c5b073660f17572492edc4f558c39b0 100644 (file)
@@ -324,15 +324,15 @@ static int check_platform_magic(struct device *dev, long ioaddr, long iolen)
 
        switch (protocol) {
        case 1:
-               outw(XEN_IOPORT_PRODNUM, XEN_IOPORT_LINUX_PRODNUM);
-               outl(XEN_IOPORT_DRVVER, XEN_IOPORT_LINUX_DRVVER);
+               outw(XEN_IOPORT_LINUX_PRODNUM, XEN_IOPORT_PRODNUM);
+               outl(XEN_IOPORT_LINUX_DRVVER, XEN_IOPORT_DRVVER);
                if (inw(XEN_IOPORT_MAGIC) != XEN_IOPORT_MAGIC_VAL) {
                        dev_err(dev, "blacklisted by host\n");
                        return -ENODEV;
                }
                /* Fall through */
        case 0:
-               outw(XEN_IOPORT_UNPLUG, 0xf);
+               outw(0xf, XEN_IOPORT_UNPLUG);
                break;
        default:
                err = "unknown I/O protocol version";